import {commGet, commPost} from "@utils/service/index.js";

export function getPerformancePage(data) {
    return commGet({
        url: `/inventoryPool/verify/page`,
        method: 'get',
        data
    })
}

/**
 * 重新审单
 * @param data
 * @returns {Promise<* extends (object & {then(onfulfilled: infer F, ...args: infer _): any}) ? (F extends ((value: infer V, ...args: infer _) => any) ? Awaited<V> : never) : *>}
 */
export function getParseOrder(data) {
    return commGet({
        url: `/inventoryPool/verify/parseOrder`,
        method: 'get',
        data
    })
}

/**
 * 获取可用的库存池
 * @param data
 * @returns {Promise<* extends (object & {then(onfulfilled: infer F, ...args: infer _): any}) ? (F extends ((value: infer V, ...args: infer _) => any) ? Awaited<V> : never) : *>}
 */
export function getSearchAvailableInventoryPool(data) {
    return commGet({
        url: `/inventoryPool/verify/searchAvailableInventoryPoolList`,
        method: 'get',
        data
    })
}
/**
 * 提交审核
 * @param data
 * @returns {Promise<* extends (object & {then(onfulfilled: infer F, ...args: infer _): any}) ? (F extends ((value: infer V, ...args: infer _) => any) ? Awaited<V> : never) : *>}
 */
export function submitVerify(data) {
    return commPost({
        url: `/ofc/wms_order/submitVerify`,
        method: 'post',
        data
    })
}
export function getSearchAvailableInventoryPoolListBySku(data) {
    return commGet({
        url: `/inventoryPool/verify/searchAvailableInventoryPoolListBySku`,
        method: 'get',
        data
    })
}

export function getLogisticsDetail(data) {
    return commGet({
        url: `/order/logistics/detail`,
        method: 'get',
        data
    })
}
export function getInventoryPoolList(data) {
    return commGet({
        url: `/inventoryPool/verify/list`,
        method: 'get',
        data
    })
}

export function clearAndVerify(data) {
    return commPost({
        url: `/inventoryPool/verify/cleanAndVerify`,
        method: 'post',
        data
    })
}
export function cleanItemAndVerify(data) {
    return commPost({
        url: `/inventoryPool/verify/cleanItemAndVerify`,
        method: 'post',
        data
    })
}
